<?php
namespace Home\Controller;
use Home\Model\LoginModel;
use Think\Controller;
class LoginController extends Controller {
    //登录
    public function index(){
        if (IS_GET) {
            $this->display();
            return;
        }
        $Login = new LoginModel();
        $data = $Login->Login();
        if(empty($data)){
            $this->ajaxReturn(array('status'=>false,'error'=>$Login->getError()));
            return;
        }
        $inforid =$data['idi'];
        session('id',$inforid);
        $this->ajaxReturn(array('status'=>true));
    }
}